import { themes } from "./model";
// 修改页面中的样式变量值
const changeStyle = (obj, themeName) => {
    for (let key in obj) {
        let bodyDom = document.getElementsByTagName("body")[0];
        bodyDom.style.setProperty(`--${key}`, obj[key]);
    }
};
// 改变主题的方法
export const setTheme = (themeName) => {
    console.log(themeName);
    const themeConfig = themes[themeName];
    changeStyle(themeConfig, themeName);
};
